﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace Stickman2D
{


	public class Tile : Sprite
	{
		public Tile(float width, float height)
		{
			initialize(new Vector2(width, height));
		}
		public Tile(Vector2 size)
		{
			initialize(size);
		}

		private void initialize(Vector2 size)
		{
			Size = size;
			Walkable = false;
		}

		public Vector2 Size { get; set; }
		public bool Walkable { get; set; }

		public void Draw(SpriteBatch sb)
		{
		}

	}

	public class Map : Sprite
	{
		Tile[,] mapa;

		public Map(int x, int y)
		{
			TileSize = new Vector2(10, 10);

			mapa = new Tile[x, y];
			for (int i = 0; i < x; i++)
			{
				for (int j = 0; j < y; j++)
				{
					mapa[i, j] = new Tile(TileSize);
				}
			}
		}

		public Vector2 TileSize { get; set; }

		public void LoadContent(ContentManager theContentManager)
		{
			Position = new Vector2(10, 10);

			List<string> sprites = new List<string>();
			sprites.Add("Tile");
			base.LoadContent(theContentManager, sprites);

			Source = new Rectangle(0, 0, 220, 120);
		}



	}
}
